<%@page contentType="text/html; charset=utf-8" %>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/validation.jsp"%>
<%@ include file="/commons/dateTime.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>接单登记</title>
<script type="text/javascript">
   function save(){
    var isTrue=$("dispatchingAdd").fireEvent("onSubmit");
      if(isTrue){
         document.getElementById("dispatchingAdd").submit();
       }
   }

   function selectPerson(){
  var url = "${ctx}/common_employeeQuery.do?method=initSelectPsrsonMain&frameName=dispatchingAdd&callBack=selectPersonCallBack&multiple=true";
		top.windowOpen(url, "selectPerson", "", 530, 700,true,"selectPerson");

  }

  function selectPersonCallBack(info){
  var onePerson= new Array();

  onePerson=info.split(";");
var name='';
    for (i=0;i<onePerson.length ;i++ )
    {
     var oneAttribute= new Array();
     oneAttribute=onePerson[i].split(",");

        var employeeName=oneAttribute[1];
     if(i==0){
     name=employeeName;
     }else{
     name=name+","+employeeName;
     }


    }
document.getElementById("executant").value=name;

  }

</script>
</head>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><span class="window_head_intext"><img src="${ctx}/images/ico_Advance.gif" align="absmiddle" /> 接单登记</span></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td colspan="2" class="aux_header_line_2"></td>
  </tr>

  <tr>
    <td colspan="2" class="content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="aux_outtable_color">
		<form id="dispatchingAdd" name="dispatchingAdd" method="post" action="${ctx}/customerService_dispatchFormAction.do?method=receiveDispatchForm" class="required-validate">
         <input type="hidden" name="dispatchId" value="${dispatchFormId}">
		<table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">

          <tr>
            <td class="aux_intable_td1">执行人：</td>
            <td width="10%" class="aux_intable_require"><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><input name="executant" type="text" readOnly class="required" value="" size="16" maxLength="36"/></td>
                  <td width="4">&nbsp;</td>
                  <td><a href="#"  onClick="selectPerson();"onFocus="this.blur()"><img src="${ctx}/images/ico_cz.gif" width="16" height="16" border="0" /></a></td>
                </tr>
            </table></td>
            </tr>
          <tr onMouseOver="document.getElementById('btn1_32').focus();" onMouseOut="document.getElementById('btn1_32').focus();">
            <td class="aux_intable_td1">接单时间：</td>
            <td class="aux_intable_td2"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><input id="receiveTime" name="receiveTime" type="text" validateUrl="${ctx}/customerService_dispatchFormAction.do?method=checkReceiveTimeAndDispatchTime" relativeId="dispatchId"
                class="validate-dateTime-yyyy-mm-dd-HH:mm validate-ajax" value="" size="16" afterInsert="receiveTimeTemp"/></td>
                <td width="4">&nbsp;</td>
                <td width="4" onClick=""><img id="receiveTimeImgBtn"  src="${ctx}/images/ico_clock.gif" width="20" height="20" /></td>
                <td width="4"><span id="receiveTimeTemp"></span></td>
              </tr>
            </table></td>
            </tr>

        </table>
        </form>
		</td>

      </tr>
    </table></td>
  </tr>
  <tr>

    <td class="window_footer"><table border="0" cellpadding="0" cellspacing="0">

      <tr onMouseOver="document.getElementById('btn1_32').focus();">
        <td class="buttonOffLeft" id="btn1_61"></td>
        <td class="buttonOffMiddle" id="btn1_62" onClick="save();"  onMouseOver="btn_change_over(6)" onMouseOut="btn_change_out(6)" onBlur="btn_change(6)"><img src="${ctx}/images/ico_ok.gif" alt="" border="0" align="absbottom" />&nbsp;保 存 </td>
        <td class="buttonOffRight" id="btn1_63"></td>
        <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onClick="windowClose();" onMouseOver="btn_change_over(3);" onMouseOut="btn_change_out(3)" onBlur="btn_change(3)"><img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom" /> 关 闭</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
	</table>
	</td>
	</tr>
	</table>

</body>
<script type="text/javascript">
    Calendar.setup(
              {
	              inputField : "receiveTime", // ID of the input field
	              ifFormat : "%Y-%m-%d %H:%M", // the date format
	              button : "receiveTimeImgBtn", // ID of the button
	              align          :    "Tl",           // alignment (defaults to "Bl")
			      singleClick    :    true,
			      showsTime      :    true,
			      position       :    [90,0]
              }
       );

</script>
</html>